using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._NetworkAnalystTools._TurnFeatureClass
{
    /// <summary>
    /// <para>Turn Table To Turn Feature Class</para>
    /// <para>Converts an ArcView turn table or ArcInfo Workstation coverage turn table to an ArcGIS turn feature class.</para>
    /// <para>将 ArcView 转盘或 ArcInfo Workstation 覆盖范围转盘转换为 ArcGIS 转盘要素类。</para>
    /// </summary>    
    [DisplayName("Turn Table To Turn Feature Class")]
    public class TurnTableToTurnFeatureClass : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public TurnTableToTurnFeatureClass()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_turn_table">
        /// <para>Input Turn Table</para>
        /// <para>The .dbf file or INFO turn table from which the new turn feature class will be created.</para>
        /// <para>将从中创建新转弯要素类的 .dbf 文件或 INFO 转弯表。</para>
        /// </param>
        /// <param name="_reference_line_features">
        /// <para>Reference Line Features</para>
        /// <para>The line feature class to which the input turn table refers. The feature class must be a source in a network dataset.</para>
        /// <para>输入转盘所引用的线要素类。要素类必须是网络数据集中的源。</para>
        /// </param>
        /// <param name="_out_feature_class_name">
        /// <para>Output Turn Feature Class Name</para>
        /// <para>The name of the new turn feature class to create.</para>
        /// <para>要创建的新转弯要素类的名称。</para>
        /// </param>
        public TurnTableToTurnFeatureClass(object _in_turn_table, object _reference_line_features, object _out_feature_class_name)
        {
            this._in_turn_table = _in_turn_table;
            this._reference_line_features = _reference_line_features;
            this._out_feature_class_name = _out_feature_class_name;
        }
        public override string ToolboxName => "Network Analyst Tools";

        public override string ToolName => "Turn Table To Turn Feature Class";

        public override string CallName => "na.TurnTableToTurnFeatureClass";

        public override List<string> AcceptEnvironments => ["configKeyword", "workspace"];

        public override object[] ParameterInfo => [_in_turn_table, _reference_line_features, _out_feature_class_name, _reference_nodes_table, _maximum_edges, _config_keyword, _spatial_grid_1, _spatial_grid_2, _spatial_grid_3, _out_turn_features];

        /// <summary>
        /// <para>Input Turn Table</para>
        /// <para>The .dbf file or INFO turn table from which the new turn feature class will be created.</para>
        /// <para>将从中创建新转弯要素类的 .dbf 文件或 INFO 转弯表。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Turn Table")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_turn_table { get; set; }


        /// <summary>
        /// <para>Reference Line Features</para>
        /// <para>The line feature class to which the input turn table refers. The feature class must be a source in a network dataset.</para>
        /// <para>输入转盘所引用的线要素类。要素类必须是网络数据集中的源。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Reference Line Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _reference_line_features { get; set; }


        /// <summary>
        /// <para>Output Turn Feature Class Name</para>
        /// <para>The name of the new turn feature class to create.</para>
        /// <para>要创建的新转弯要素类的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Turn Feature Class Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_feature_class_name { get; set; }


        /// <summary>
        /// <para>Reference Nodes Table</para>
        /// <para><xdoc>
        ///   <para>The nodes.dbf table in the .nws folder containing the original ArcView GIS network in which the input turn table participated.</para>
        ///   <para>This parameter is ignored if the input turn table is an INFO table.</para>
        ///   <para>If the input turn table is a .dbf table and this parameter is omitted, then U-turns and turns that traverse between edges connected to each other at both ends will not be created in the output turn feature class.</para>
        ///   <para>Errors will be reported in an error file written to the directory defined by the TEMP system variable. The full path name to the error file is reported as a warning message.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>.nws 文件夹中的 nodes.dbf 表，其中包含输入转盘参与的原始 ArcView GIS 网络。</para>
        ///   <para>如果输入转盘表是 INFO 表，则忽略此参数。</para>
        ///   <para>如果输入转床表是 .dbf 表且省略此参数，则不会在输出转弯要素类中创建在两端相互连接的边之间遍历的 U 形转弯和转弯。</para>
        ///   <para>错误将在写入 TEMP 系统变量定义的目录的错误文件中报告。错误文件的完整路径名将报告为警告消息。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Reference Nodes Table")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _reference_nodes_table { get; set; } = null;


        /// <summary>
        /// <para>Maximum Edges</para>
        /// <para>The maximum number of edges per turn in the new turn feature class. The default value is 5. The maximum value is 50.</para>
        /// <para>新转弯要素类中每圈的最大边数。默认值为 5。最大值为 50。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Maximum Edges")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long _maximum_edges { get; set; } = 5;


        /// <summary>
        /// <para>Configuration Keyword</para>
        /// <para>Specifies the configuration keyword that determines the storage parameters of the output turn feature class. This parameter is used only if the output turn feature class is created in a workgroup or enterprise geodatabase.</para>
        /// <para>指定用于确定输出转弯要素类的存储参数的配置关键字。仅当在工作组或企业级地理数据库中创建输出转弯要素类时，才使用此参数。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Configuration Keyword")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _config_keyword { get; set; } = null;


        /// <summary>
        /// <para>Output Spatial Grid 1</para>
        /// <para>This parameter has been deprecated in ArcGIS Pro. Any value you enter is ignored.</para>
        /// <para>此参数在 ArcGIS Pro 中已弃用。您输入的任何值都将被忽略。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Spatial Grid 1")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _spatial_grid_1 { get; set; } = 1000;


        /// <summary>
        /// <para>Output Spatial Grid 2</para>
        /// <para>This parameter has been deprecated in ArcGIS Pro. Any value you enter is ignored.</para>
        /// <para>此参数在 ArcGIS Pro 中已弃用。您输入的任何值都将被忽略。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Spatial Grid 2")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _spatial_grid_2 { get; set; } = 0;


        /// <summary>
        /// <para>Output Spatial Grid 3</para>
        /// <para>This parameter has been deprecated in ArcGIS Pro. Any value you enter is ignored.</para>
        /// <para>此参数在 ArcGIS Pro 中已弃用。您输入的任何值都将被忽略。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Spatial Grid 3")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _spatial_grid_3 { get; set; } = 0;


        /// <summary>
        /// <para>Output Turn Feature Class</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Turn Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_turn_features { get; set; }


        public TurnTableToTurnFeatureClass SetEnv(object configKeyword = null, object workspace = null)
        {
            base.SetEnv(configKeyword: configKeyword, workspace: workspace);
            return this;
        }

    }

}